Chapter 1 Kinetic EFM Installation

Install the EFM Local Broker

  1. SSH into the local broker as efm with password kinetic123

Double-check that you are connecting to the private IP address of the local broker and not the remote broker. Refer to Chapter 0 Getting Started if you don’t remember your local broker’s IP address. The command prompt should start with efm@l-broker-.

  1. Unzip EFM and install it
unzip EFM-1-5-0.zip
cd EFM-1-5-0
./efm-linux install broker
Hit ENTER to accept the defaults when prompted, except for the following:

Connect the EFM Local Broker to the Remote Broker

  1. Set the remote broker IP address as a shell variable, making sure to not hit the ENTER key until specified
R_BROKER_IP='
Now type in the public IP address of your station’s remote broker that the instructor displayed and you wrote down and end the statement with a closing single quote
'
Now you can hit the ENTER key
This will set a variable on the Linux command line shell so that the next command doesn’t need to be modified for each station’s remote broker IP address. The full command should look similar to this (with your remote broker’s IP address, of course) when entered with no line breaks: R_BROKER_IP='100.1.1.1'
  1. Update the server.json file with the remote broker IP address
sed -i "s/\"upstream\": {},/\"upstream\": { \"r-broker\": { \"name\": \"l-broker\", \"url\": \"https:\/\/$R_BROKER_IP:8443\/conn\", \"group\": \":config\", \"enabled\": true } },/" /opt/cisco/kinetic/efm_server/server.json
Make sure you use copy and paste in this chapter rather than trying to retype the specified commands. Each command block can be copied and pasted in its entirety.

Start the EFM Local Broker

  1. Start EFM

Note that this is only one command with no line breaks

/opt/cisco/kinetic/dart-sdk/bin/dart /opt/cisco/kinetic/efm_server/bin/daemon.dart start
  1. Exit the SSH session with exit and the server will continue running

Install the EFM Remote Broker

  1. SSH into the remote broker as efm with password kinetic123

Make sure you are connecting to the public IP address of the remote broker and not the local broker. This is the IP address the instructor displayed and you wrote down. The command prompt should start with efm@r-broker-.

  1. Unzip EFM and install it
unzip EFM-1-5-0.zip
cd EFM-1-5-0
./efm-linux install
Hit ENTER to accept the defaults when prompted, except for the following:
  1. Update the EFM broker configuration file to only allow automatic connections from other EFM brokers with tokens and to quarantine EFM brokers without tokens
sed -i 's/"quarantine": false,/"quarantine": true,/' /opt/cisco/kinetic/efm_server/server.json
sed -i 's/"allowAllLinks": true,/"allowAllLinks": false,/' /opt/cisco/kinetic/efm_server/server.json
  1. Add the ParStream environment variables to the efm user’s .bashrc file
tee -a ~/.bashrc 1> /dev/null << EOT
# ParStream Settings
export PARSTREAM_HOME=/opt/cisco/kinetic/parstream
export LD_LIBRARY_PATH=\$PARSTREAM_HOME/lib:\$LD_LIBRARY_PATH
export PATH=\$PARSTREAM_HOME/bin:\$PATH
EOT
  1. Refresh the .bashrc changes
source ~/.bashrc

Start the EFM Remote Broker

  1. Start EFM

Note that this is only one command with no line breaks

/opt/cisco/kinetic/dart-sdk/bin/dart /opt/cisco/kinetic/efm_server/bin/daemon.dart start
  1. Start ParStream
cd /opt/cisco/kinetic/parstream/examples/noauthentication
parstream-server first &
  1. Wait 15-20 seconds for all the log messages to stop before moving on to the next step to ensure the ParStream database is up and running

Add the Lab ParStream Tables

  1. Install the ParStream tables to store sensor and control data
cd ~/sql
pnc -p 9042 < sensor_data.sql
pnc -p 9042 < control_data.sql
You should see messages that say Table 'sensor_data' successfully created. and Table 'control_data' successfully created.
  1. Exit the SSH session with exit and the server will continue running

In production you would set these servers to start and stop automatically via systemd scripts, however we aren’t concerned with this step in this lab.


On to Chapter 2 Kinetic EFM Configuration

left-chevronright-chevron